﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using MockPrjTeam4.Entity;
using MockPrjTeam4.DAO;

namespace MockPrjTeam4.Biz
{
    public class ContactBiz
    {
        public static bool AddContact(Contacts contact)
        {
            return ContactsDAO.AddContacts(contact);
        }

        public static bool EditContact(Contacts contact)
        {
            return ContactsDAO.EditContacts(contact);
        }

        public static List<Contacts> GetListActiveContacts()
        {
            return ContactsDAO.GetListActiveContacts();
        }

        public static List<Contacts> GetListContact()
        {
            return ContactsDAO.GetListContacts();
        }

        public static IList<Contacts> Search(string firstName, string surname, string IsActive)
        {
            return ContactsDAO.Search(firstName, surname, IsActive);
        }

        public static IList<Contacts> Search(string firstName, string surname)
        {
            return ContactsDAO.Search(firstName, surname);
        }

        public static Contacts GetContactById(int id)
        {
            return ContactsDAO.GetContactById(id);
        }

        public static bool DeleteContact(int id)
        {
            return ContactsDAO.DeleteContact(id);
        }

        public static IList<Contacts> SearchFilter(string range, bool inActive)
        {
            return ContactsDAO.SearchFilter(range, inActive);
        }

        public static DataTable GetContactSP()
        {
            return ContactsDAO.GetContactSP();
        }
    }
}